UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MYc/4UnBbDer5P15vpVsYVs/m6Pg5b6Hw5cGWM/A1dU='
WHERE
key_id = '1cb938dbb6272ca36512bc1e2183b81c7349278bd624e356f0c56f9c103350a8'
AND (
token = 'MYc/4UnBbDer5P15vpVsYVs/m6Pg5b6Hw5cGWM/A1dU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)