UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y0oUIxi0pZ8X1L5CMC/66WMdltt5ZIIbDJsRjaVKn/A='
WHERE
key_id = 'b6ff17269a060884ace89d8c54785f46006196bb44dfe459a0439efb47f04d44'
AND (
token = 'y0oUIxi0pZ8X1L5CMC/66WMdltt5ZIIbDJsRjaVKn/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)