UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IBifnnR9sjLK5ew+YnO3mvefcDIlhZr6n99XEtdhv6g='
WHERE
key_id = '3d68c6eec3a11d71e0c580211eee60d1e45c19d11fc598ceac9089a0a4e702d9'
AND (
token = 'IBifnnR9sjLK5ew+YnO3mvefcDIlhZr6n99XEtdhv6g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)