UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FUiN+iZPhdzjjrDAbDUKgtK1GjBI8tL45Oy3mEW6/bc='
WHERE
key_id = '4de2aa5f7342081ec28af498ad8a83d74e150bd22225006d50e927179bfbb322'
AND (
token = 'FUiN+iZPhdzjjrDAbDUKgtK1GjBI8tL45Oy3mEW6/bc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)