UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VyMZnRlahphX8qF/o30U0khbqmXTOyds7H0EFsMRbrE='
WHERE
key_id = 'bcb065f6bd6dce0f096655fcaec84db9530be4efd2b358c82a8b020da75008d2'
AND (
token = 'VyMZnRlahphX8qF/o30U0khbqmXTOyds7H0EFsMRbrE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)