UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'W62ARPSbcTLuUFQyuNjrfZ3DYjSa/LBl+xcSs9yCh0c='
WHERE
key_id = '76cec149e58214f90f1a8cef2a7fac6cda4a2326fee8d2477cf06ddd41145852'
AND (
token = 'W62ARPSbcTLuUFQyuNjrfZ3DYjSa/LBl+xcSs9yCh0c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)