UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RV5/QL1Xg0m63l/4bS6p35LVOV3KL7pYIyMFG8DJxcI='
WHERE
key_id = '05bb2e55a8f0a00e34e594aea977e5d72b1cbc1045929d488f7e5cf10e3af274'
AND (
token = 'RV5/QL1Xg0m63l/4bS6p35LVOV3KL7pYIyMFG8DJxcI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)