UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '11HYqWp+bYhOZ+9hJPP1YQxZ/Ip3Gr6CdeJO5k5ngBs='
WHERE
key_id = 'e377523e9b405e66a094fc6997448ca1f95e023d19fac8496a82c565cae4dfa3'
AND (
token = '11HYqWp+bYhOZ+9hJPP1YQxZ/Ip3Gr6CdeJO5k5ngBs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)