UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6zRTdbcfCTFjL0LhSbkGQDIgAFIv538ivxsazwbl6/0='
WHERE
key_id = '101d515d5f7d158bbfc6e3874080c0f8269711b36f2eca80aaae1a0217fbcfac'
AND (
token = '6zRTdbcfCTFjL0LhSbkGQDIgAFIv538ivxsazwbl6/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)