UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o1eiQqTE7Lmu/JV61G96Fcm9BwuYJlU48wjoPN4TooI='
WHERE
key_id = '3823262ea152f19ce9cfe9cbe88c4d773d05c3c1cc0194acc8acbb17b3e7fac0'
AND (
token = 'o1eiQqTE7Lmu/JV61G96Fcm9BwuYJlU48wjoPN4TooI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)