UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ipAN2ESu77GFn/Sreoz0v6g/VGBg+dLTb9vopVdunqA='
WHERE
key_id = '55d026933f5f99c03e953732d45792123abaab66dd182c1db1401c9a37c50d05'
AND (
token = 'ipAN2ESu77GFn/Sreoz0v6g/VGBg+dLTb9vopVdunqA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)