UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Iu7oLqAM1g/YOj89Tpp3dA9jZ7Kk4R0AfK7WXeiC6qA='
WHERE
key_id = '5dc52a5a847aa719dbaef060044cb66c6d2029f3b875b9fc8eb90cd7555dcd71'
AND (
token = 'Iu7oLqAM1g/YOj89Tpp3dA9jZ7Kk4R0AfK7WXeiC6qA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)