UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pCuODM5oovhPthQ7c26nIoDj09xEfq5x8qOOXkGLB7s='
WHERE
key_id = '53e0f086cf23dde1a0b9dc73b1cb2a1cd3456d07477845bcda8b781e99f4e0c5'
AND (
token = 'pCuODM5oovhPthQ7c26nIoDj09xEfq5x8qOOXkGLB7s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)