UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Oww/Obsx/p+6K9qPRgFkaWQYu0JSPa+hTa2XXHqKaKA='
WHERE
key_id = 'dcd3daba67e9e59a7782c657c05f63ff5327296cb75763a6be7ab4a60fdabc22'
AND (
token = 'Oww/Obsx/p+6K9qPRgFkaWQYu0JSPa+hTa2XXHqKaKA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)