UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LpQBSRYN8i1chOnCLN2lNdF/ZSPnMhSbSDXzT6l8/aQ='
WHERE
key_id = '7cc26e915d9ecab103bfdf87ceb30b257c7106d7f12b6b9eaf9856ac536bff0a'
AND (
token = 'LpQBSRYN8i1chOnCLN2lNdF/ZSPnMhSbSDXzT6l8/aQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)