UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TMtl23xzBqorGhZz3REXR59qn6j2pC5iNEM+Y+kSF88='
WHERE
key_id = '26db905252383978d0096fcff8855a00b6d7e86e07656408b2841908cf5b5db7'
AND (
token = 'TMtl23xzBqorGhZz3REXR59qn6j2pC5iNEM+Y+kSF88='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)