UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kOgFlGQL1YtBx6/6aAgyudmFyuSLzwV3TEBVfK/nCpE='
WHERE
key_id = '99afe65b3774158f2ff1068224167587f25e2a97da708e24438a73c13ef5bc20'
AND (
token = 'kOgFlGQL1YtBx6/6aAgyudmFyuSLzwV3TEBVfK/nCpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)