UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FtH/gSFCMrWjp2jxGW6m7Mai/Q+4epC1dxERDlQ5VMs='
WHERE
key_id = '62524aa1bd3d51661e485da3f950a50d0591d9b9d8c7948b22014017ab0c6a45'
AND (
token = 'FtH/gSFCMrWjp2jxGW6m7Mai/Q+4epC1dxERDlQ5VMs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)