UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LAbe1G0LSvpGqTv6Vo952jW9fsqahCWhSm5E8xwAIkU='
WHERE
key_id = '259835f05afa4d396ea58e515f27f01dbc86cf592a3cb37c0f5bfbfadaf287c9'
AND (
token = 'LAbe1G0LSvpGqTv6Vo952jW9fsqahCWhSm5E8xwAIkU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)