UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OXI5HNFN4mPqGTSz3j5LQ/mpcZw5Vi+pkL6faSxG2eM='
WHERE
key_id = '41b0167bbfd718d0a6f5421512947aca69d792fc536c05a6f4f469a02dd2efe1'
AND (
token = 'OXI5HNFN4mPqGTSz3j5LQ/mpcZw5Vi+pkL6faSxG2eM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)