UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qd6n4X5CMZCQGUZRe60ys3RQahP4P18zZIBYlky/61c='
WHERE
key_id = '6101a6ec9002fe3b8b6e2ef9ffacd30624323b3b26f17623ab8533a2cd3bc2ff'
AND (
token = 'qd6n4X5CMZCQGUZRe60ys3RQahP4P18zZIBYlky/61c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)