UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '73UIQgaW0MH3RJvtT4mkD1IboDoS7e77lKRWHdi+eFY='
WHERE
key_id = '2c693076a5fdf9e6e1107f067c4e38b9769b9c33fa681a957bc07cb40a841ceb'
AND (
token = '73UIQgaW0MH3RJvtT4mkD1IboDoS7e77lKRWHdi+eFY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)