UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uLmmV/+g5axaT7nFUGkb6rSZ6hMDYxOrpltUDFieDV8='
WHERE
key_id = '11cc3a7bf8bf726a27bfeaa0f389eaf077bfd6111a3e9c31372b658dd4fe453e'
AND (
token = 'uLmmV/+g5axaT7nFUGkb6rSZ6hMDYxOrpltUDFieDV8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)