UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T8WGmuBuPGqzFdGmFl6IiufG/szJ5Sf6nCzKZ9OC+EQ='
WHERE
key_id = 'c0932da5a231b74006ec8582fd98644a01f6fb716f1b245bc31ef6bf1a2416e7'
AND (
token = 'T8WGmuBuPGqzFdGmFl6IiufG/szJ5Sf6nCzKZ9OC+EQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)