UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FjJqVTSYjM7sb2TF7qUc2l6F728JlvK8x5SqWoiHj8Q='
WHERE
key_id = '2bc554d0acb997ca867e08eb62905efe36f2035dc566b47d0c791cf51d5d873c'
AND (
token = 'FjJqVTSYjM7sb2TF7qUc2l6F728JlvK8x5SqWoiHj8Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)