UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3XPOXUFBibPujZ/Qtzpp7YBVAoxLs+OXFLT3O11C4RI='
WHERE
key_id = '2741b85d935bae40320b6f310737f7acfc3d4469d9936fb28d29acf0283e8855'
AND (
token = '3XPOXUFBibPujZ/Qtzpp7YBVAoxLs+OXFLT3O11C4RI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)