UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vkZAUvo7Jl8FOj6D3gv7iQ8MYihGz3jEUcnr2naS6/Y='
WHERE
key_id = 'f541136fd82b4eaecae222effa4230cdbee2ba47af23ca1541efbcad9dcefdd7'
AND (
token = 'vkZAUvo7Jl8FOj6D3gv7iQ8MYihGz3jEUcnr2naS6/Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)